home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
nt
/
lkbackup.zip
/
ntmem.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-09-25
|
868b
|
26 lines
// some memory function
//
// This is for the memory functions swiped from PERL...
#ifndef NTMEM_H
#define NTMEM_H
#define FLUSH ;fflush( stderr )
#define Nullch (char*)0
#define New(x,v,n,t) (v = (t*)safemalloc(((unsigned long)(n) * sizeof(t))))
#define Newc(x,v,n,t,c) (v = (c*)safemalloc(((unsigned long)(n) * sizeof(t))))
#define Newz(x,v,n,t) (v = (t*)safemalloc(((unsigned long)(n) * sizeof(t)))), \
memzero((char*)(v), (n) * sizeof(t))
#define Renew(v,n,t) (v = (t*)saferealloc((char*)(v),((unsigned long)(n)*sizeof(t))))
#define Renewc(v,n,t,c) (v = (c*)saferealloc((char*)(v),((unsigned long)(n)*sizeof(t))))
#define Safefree(d) safefree((char*)d)
#define Str_new(x,len) str_new(len)
char *safemalloc(size_t);
char *saferealloc(char *, size_t);
void safefree(char *);
void *memzero(char *, size_t);
#endif NTMEM_H